/*
 * XML Type:  SecurityList
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.SecurityList
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML SecurityList(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class SecurityListImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.SecurityList
{
    
    public SecurityListImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName MFINFO$0 = 
        new javax.xml.namespace.QName("", "MFINFO");
    private static final javax.xml.namespace.QName STOCKINFO$2 = 
        new javax.xml.namespace.QName("", "STOCKINFO");
    private static final javax.xml.namespace.QName OPTINFO$4 = 
        new javax.xml.namespace.QName("", "OPTINFO");
    private static final javax.xml.namespace.QName DEBTINFO$6 = 
        new javax.xml.namespace.QName("", "DEBTINFO");
    private static final javax.xml.namespace.QName OTHERINFO$8 = 
        new javax.xml.namespace.QName("", "OTHERINFO");
    
    
    /**
     * Gets array of all "MFINFO" elements
     */
    public net.ofx.types.x2003.x04.MutualFundInfo[] getMFINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(MFINFO$0, targetList);
            net.ofx.types.x2003.x04.MutualFundInfo[] result = new net.ofx.types.x2003.x04.MutualFundInfo[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "MFINFO" element
     */
    public net.ofx.types.x2003.x04.MutualFundInfo getMFINFOArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MutualFundInfo target = null;
            target = (net.ofx.types.x2003.x04.MutualFundInfo)get_store().find_element_user(MFINFO$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "MFINFO" element
     */
    public int sizeOfMFINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(MFINFO$0);
        }
    }
    
    /**
     * Sets array of all "MFINFO" element
     */
    public void setMFINFOArray(net.ofx.types.x2003.x04.MutualFundInfo[] mfinfoArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(mfinfoArray, MFINFO$0);
        }
    }
    
    /**
     * Sets ith "MFINFO" element
     */
    public void setMFINFOArray(int i, net.ofx.types.x2003.x04.MutualFundInfo mfinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MutualFundInfo target = null;
            target = (net.ofx.types.x2003.x04.MutualFundInfo)get_store().find_element_user(MFINFO$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(mfinfo);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "MFINFO" element
     */
    public net.ofx.types.x2003.x04.MutualFundInfo insertNewMFINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MutualFundInfo target = null;
            target = (net.ofx.types.x2003.x04.MutualFundInfo)get_store().insert_element_user(MFINFO$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "MFINFO" element
     */
    public net.ofx.types.x2003.x04.MutualFundInfo addNewMFINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MutualFundInfo target = null;
            target = (net.ofx.types.x2003.x04.MutualFundInfo)get_store().add_element_user(MFINFO$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "MFINFO" element
     */
    public void removeMFINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(MFINFO$0, i);
        }
    }
    
    /**
     * Gets array of all "STOCKINFO" elements
     */
    public net.ofx.types.x2003.x04.StockInfo[] getSTOCKINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(STOCKINFO$2, targetList);
            net.ofx.types.x2003.x04.StockInfo[] result = new net.ofx.types.x2003.x04.StockInfo[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "STOCKINFO" element
     */
    public net.ofx.types.x2003.x04.StockInfo getSTOCKINFOArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StockInfo target = null;
            target = (net.ofx.types.x2003.x04.StockInfo)get_store().find_element_user(STOCKINFO$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "STOCKINFO" element
     */
    public int sizeOfSTOCKINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(STOCKINFO$2);
        }
    }
    
    /**
     * Sets array of all "STOCKINFO" element
     */
    public void setSTOCKINFOArray(net.ofx.types.x2003.x04.StockInfo[] stockinfoArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(stockinfoArray, STOCKINFO$2);
        }
    }
    
    /**
     * Sets ith "STOCKINFO" element
     */
    public void setSTOCKINFOArray(int i, net.ofx.types.x2003.x04.StockInfo stockinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StockInfo target = null;
            target = (net.ofx.types.x2003.x04.StockInfo)get_store().find_element_user(STOCKINFO$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(stockinfo);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "STOCKINFO" element
     */
    public net.ofx.types.x2003.x04.StockInfo insertNewSTOCKINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StockInfo target = null;
            target = (net.ofx.types.x2003.x04.StockInfo)get_store().insert_element_user(STOCKINFO$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "STOCKINFO" element
     */
    public net.ofx.types.x2003.x04.StockInfo addNewSTOCKINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StockInfo target = null;
            target = (net.ofx.types.x2003.x04.StockInfo)get_store().add_element_user(STOCKINFO$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "STOCKINFO" element
     */
    public void removeSTOCKINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(STOCKINFO$2, i);
        }
    }
    
    /**
     * Gets array of all "OPTINFO" elements
     */
    public net.ofx.types.x2003.x04.OptionInfo[] getOPTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(OPTINFO$4, targetList);
            net.ofx.types.x2003.x04.OptionInfo[] result = new net.ofx.types.x2003.x04.OptionInfo[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "OPTINFO" element
     */
    public net.ofx.types.x2003.x04.OptionInfo getOPTINFOArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.OptionInfo target = null;
            target = (net.ofx.types.x2003.x04.OptionInfo)get_store().find_element_user(OPTINFO$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "OPTINFO" element
     */
    public int sizeOfOPTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(OPTINFO$4);
        }
    }
    
    /**
     * Sets array of all "OPTINFO" element
     */
    public void setOPTINFOArray(net.ofx.types.x2003.x04.OptionInfo[] optinfoArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(optinfoArray, OPTINFO$4);
        }
    }
    
    /**
     * Sets ith "OPTINFO" element
     */
    public void setOPTINFOArray(int i, net.ofx.types.x2003.x04.OptionInfo optinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.OptionInfo target = null;
            target = (net.ofx.types.x2003.x04.OptionInfo)get_store().find_element_user(OPTINFO$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(optinfo);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "OPTINFO" element
     */
    public net.ofx.types.x2003.x04.OptionInfo insertNewOPTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.OptionInfo target = null;
            target = (net.ofx.types.x2003.x04.OptionInfo)get_store().insert_element_user(OPTINFO$4, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "OPTINFO" element
     */
    public net.ofx.types.x2003.x04.OptionInfo addNewOPTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.OptionInfo target = null;
            target = (net.ofx.types.x2003.x04.OptionInfo)get_store().add_element_user(OPTINFO$4);
            return target;
        }
    }
    
    /**
     * Removes the ith "OPTINFO" element
     */
    public void removeOPTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(OPTINFO$4, i);
        }
    }
    
    /**
     * Gets array of all "DEBTINFO" elements
     */
    public net.ofx.types.x2003.x04.DebtInfo[] getDEBTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(DEBTINFO$6, targetList);
            net.ofx.types.x2003.x04.DebtInfo[] result = new net.ofx.types.x2003.x04.DebtInfo[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "DEBTINFO" element
     */
    public net.ofx.types.x2003.x04.DebtInfo getDEBTINFOArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DebtInfo target = null;
            target = (net.ofx.types.x2003.x04.DebtInfo)get_store().find_element_user(DEBTINFO$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "DEBTINFO" element
     */
    public int sizeOfDEBTINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(DEBTINFO$6);
        }
    }
    
    /**
     * Sets array of all "DEBTINFO" element
     */
    public void setDEBTINFOArray(net.ofx.types.x2003.x04.DebtInfo[] debtinfoArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(debtinfoArray, DEBTINFO$6);
        }
    }
    
    /**
     * Sets ith "DEBTINFO" element
     */
    public void setDEBTINFOArray(int i, net.ofx.types.x2003.x04.DebtInfo debtinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DebtInfo target = null;
            target = (net.ofx.types.x2003.x04.DebtInfo)get_store().find_element_user(DEBTINFO$6, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(debtinfo);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "DEBTINFO" element
     */
    public net.ofx.types.x2003.x04.DebtInfo insertNewDEBTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DebtInfo target = null;
            target = (net.ofx.types.x2003.x04.DebtInfo)get_store().insert_element_user(DEBTINFO$6, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "DEBTINFO" element
     */
    public net.ofx.types.x2003.x04.DebtInfo addNewDEBTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.DebtInfo target = null;
            target = (net.ofx.types.x2003.x04.DebtInfo)get_store().add_element_user(DEBTINFO$6);
            return target;
        }
    }
    
    /**
     * Removes the ith "DEBTINFO" element
     */
    public void removeDEBTINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(DEBTINFO$6, i);
        }
    }
    
    /**
     * Gets array of all "OTHERINFO" elements
     */
    public net.ofx.types.x2003.x04.OtherInfo[] getOTHERINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(OTHERINFO$8, targetList);
            net.ofx.types.x2003.x04.OtherInfo[] result = new net.ofx.types.x2003.x04.OtherInfo[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "OTHERINFO" element
     */
    public net.ofx.types.x2003.x04.OtherInfo getOTHERINFOArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.OtherInfo target = null;
            target = (net.ofx.types.x2003.x04.OtherInfo)get_store().find_element_user(OTHERINFO$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "OTHERINFO" element
     */
    public int sizeOfOTHERINFOArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(OTHERINFO$8);
        }
    }
    
    /**
     * Sets array of all "OTHERINFO" element
     */
    public void setOTHERINFOArray(net.ofx.types.x2003.x04.OtherInfo[] otherinfoArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(otherinfoArray, OTHERINFO$8);
        }
    }
    
    /**
     * Sets ith "OTHERINFO" element
     */
    public void setOTHERINFOArray(int i, net.ofx.types.x2003.x04.OtherInfo otherinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.OtherInfo target = null;
            target = (net.ofx.types.x2003.x04.OtherInfo)get_store().find_element_user(OTHERINFO$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(otherinfo);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "OTHERINFO" element
     */
    public net.ofx.types.x2003.x04.OtherInfo insertNewOTHERINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.OtherInfo target = null;
            target = (net.ofx.types.x2003.x04.OtherInfo)get_store().insert_element_user(OTHERINFO$8, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "OTHERINFO" element
     */
    public net.ofx.types.x2003.x04.OtherInfo addNewOTHERINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.OtherInfo target = null;
            target = (net.ofx.types.x2003.x04.OtherInfo)get_store().add_element_user(OTHERINFO$8);
            return target;
        }
    }
    
    /**
     * Removes the ith "OTHERINFO" element
     */
    public void removeOTHERINFO(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(OTHERINFO$8, i);
        }
    }
}
